class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.r: F = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.p: H = None
        self.u: B = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.q: H = None
        self.r: D = None
        self.u: A = None
        self.p: H = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: H = None
        self.z: D = None
        self.u: A = None
        self.x: G = None
        self.s: F = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

a = A("a")
j = B("j")
m = C("m")
c = D("c")
d = E("d")
g = F("g")
l = G("l")
f = H("f")
b = G("b")
e = H("e")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.p: H = None
        self.u: B = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.q: H = None
        self.r: D = None
        self.u: A = None
        self.p: H = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: H = None
        self.z: D = None
        self.u: A = None
        self.x: G = None
        self.s: F = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

a = A("a")
j = B("j")
m = C("m")
c = D("c")
d = E("d")
g = F("g")
l = G("l")
f = H("f")
b = G("b")
e = H("e")

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