class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: H = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.u: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.u: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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