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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.q: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.q: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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