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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.o: G = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: G = None
        self.s: E = None
        self.t: C = None
        self.p: E = None
        self.y: C = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.o: G = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: G = None
        self.s: E = None
        self.t: C = None
        self.p: E = None
        self.y: C = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

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

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