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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.x: A = None
        self.p: E = None
        self.w: C = None
        self.q: E = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: G = None
        self.s: A = None
        self.y: G = None
        self.o: A = None
        self.w: A = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.x: A = None
        self.p: E = None
        self.w: C = None
        self.q: E = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: G = None
        self.s: A = None
        self.y: G = None
        self.o: A = None
        self.w: A = None
        self.z: G = None
        self.txt = txt

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

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