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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.w: C = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.w: E = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.w: C = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.w: E = None
        self.t: D = None
        self.txt = txt

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

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

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