class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: H = None
        self.r: B = None
        self.v: B = None
        self.q: H = None
        self.z: E = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.v: A = None
        self.r: F = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.p: E = None
        self.s: A = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.v: A = None
        self.r: F = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.p: E = None
        self.s: A = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.txt = txt

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

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