class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.v: G = None
        self.q: D = None
        self.s: B = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.p: D = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.q: G = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: E = None
        self.y: E = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

c = A("c")
i = B("i")
b = C("b")
n = D("n")
m = E("m")
h = F("h")
f = G("f")
d = F("d")
e = E("e")

c.x = f
i.q = c
i.r = c
i.v = b
i.t = m
b.t = f
b.v = f
b.p = n
b.q = n
b.s = i
b.x = c
b.r = h
n.s = h
n.o = i
m.v = c
m.w = b
m.y = b
m.p = n
m.q = n
h.y = c
h.s = n
h.x = n
h.q = f
h.w = d
f.u = c
f.q = c
f.v = m
f.y = m
f.t = m
d.y = c
d.s = n
d.x = n
d.q = f
d.w = h
e.v = c
e.w = b
e.y = b
e.p = n
e.q = n
assert f.y.v.x.q.x.u.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.v: G = None
        self.q: D = None
        self.s: B = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.p: D = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.q: G = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: E = None
        self.y: E = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

c = A("c")
i = B("i")
b = C("b")
n = D("n")
m = E("m")
h = F("h")
f = G("f")
d = F("d")
e = E("e")

c.x = f
i.q = c
i.r = c
i.v = b
i.t = m
b.t = f
b.v = f
b.p = n
b.q = n
b.s = i
b.x = c
b.r = h
n.s = h
n.o = i
m.v = c
m.w = b
m.y = b
m.p = n
m.q = n
h.y = c
h.s = n
h.x = n
h.q = f
h.w = d
f.u = c
f.q = c
f.v = m
f.y = m
f.t = m
d.y = c
d.s = n
d.x = n
d.q = f
d.w = h
e.v = c
e.w = b
e.y = b
e.p = n
e.q = n
assert f.y.v.x.q.x.u.x.y.txt == "m"