class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: H = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: B = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.q: D = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

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

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

l.p = n
l.v = j
l.z = j
l.u = k
h.q = b
h.v = n
n.q = h
n.w = b
n.x = k
n.y = k
j.o = b
j.q = h
j.x = e
j.z = i
f.p = i
f.s = e
f.q = e
f.t = e
f.r = k
f.w = c
f.u = h
f.o = j
e.u = i
e.s = i
e.r = h
e.q = j
e.x = l
k.x = f
k.s = j
b.o = f
i.p = n
i.v = j
i.z = j
i.u = k
c.p = n
c.v = j
c.z = j
c.u = k
assert c.u.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: H = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: B = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.q: D = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

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

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

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