class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.z: E = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.v: C = None
        self.s: F = None
        self.t: B = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.z: E = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.v: C = None
        self.s: F = None
        self.t: B = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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