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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.z: D = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: B = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

j = A("j")
e = B("e")
b = C("b")
d = D("d")
a = E("a")
k = F("k")
c = G("c")
l = G("l")
f = F("f")
i = D("i")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.z: D = None
        self.u: G = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: B = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

j = A("j")
e = B("e")
b = C("b")
d = D("d")
a = E("a")
k = F("k")
c = G("c")
l = G("l")
f = F("f")
i = D("i")

j.z = b
j.t = b
j.q = e
j.u = a
e.r = d
e.z = d
e.q = c
e.u = c
e.t = k
b.s = l
b.t = l
b.o = e
b.y = e
d.t = f
d.q = i
d.x = i
d.p = e
a.w = f
k.w = f
k.v = e
k.u = i
c.u = b
c.p = l
c.r = e
l.u = b
l.p = c
l.r = e
f.w = k
f.v = e
f.u = i
i.t = f
i.q = d
i.x = d
i.p = e
assert j.t.s.u.t.r.txt == "e"