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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.o: E = None
        self.z: C = None
        self.r: C = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.x: E = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

d = A("d")
m = B("m")
e = C("e")
a = D("a")
c = E("c")
k = F("k")
b = G("b")
f = C("f")
g = E("g")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.o: E = None
        self.z: C = None
        self.r: C = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.x: E = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

d = A("d")
m = B("m")
e = C("e")
a = D("a")
c = E("c")
k = F("k")
b = G("b")
f = C("f")
g = E("g")

d.t = c
d.r = k
d.q = m
d.y = f
m.r = c
m.z = k
e.v = k
e.q = k
e.w = f
e.z = f
e.r = f
e.o = c
e.u = c
a.t = e
c.z = m
c.u = m
c.w = m
c.x = g
k.q = a
k.p = e
b.u = m
b.z = f
f.v = k
f.q = k
f.w = e
f.z = e
f.r = e
f.o = c
f.u = g
g.z = m
g.u = m
g.w = m
g.x = c
assert e.o.w.z.q.t.o.txt == "c"