class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.w: E = None
        self.x: A = None
        self.y: E = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.txt = txt

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

i = A("i")
k = B("k")
n = C("n")
c = D("c")
g = E("g")
h = F("h")
j = G("j")
d = H("d")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.w: E = None
        self.x: A = None
        self.y: E = None
        self.s: G = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.txt = txt

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

i = A("i")
k = B("k")
n = C("n")
c = D("c")
g = E("g")
h = F("h")
j = G("j")
d = H("d")
l = G("l")

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