class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.w: F = None
        self.y: C = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.w: C = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.x: D = None
        self.u: B = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.w: C = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.x: D = None
        self.u: B = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

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