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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.v: C = None
        self.r: F = None
        self.u: C = None
        self.x: E = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.x: G = None
        self.o: G = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.v: C = None
        self.r: F = None
        self.u: C = None
        self.x: E = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: A = None
        self.x: G = None
        self.o: G = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.txt = txt

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

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

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