class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.s: C = None
        self.x: F = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: A = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: A = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

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

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

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