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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.y: A = None
        self.r: B = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: H = None
        self.u: E = None
        self.t: H = None
        self.v: A = None
        self.x: E = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.y: A = None
        self.r: B = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: H = None
        self.u: E = None
        self.t: H = None
        self.v: A = None
        self.x: E = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.txt = txt

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

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

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