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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.w: H = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: G = None
        self.p: A = None
        self.y: G = None
        self.t: G = None
        self.z: C = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.y: H = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.w: C = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.w: H = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: G = None
        self.p: A = None
        self.y: G = None
        self.t: G = None
        self.z: C = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.y: H = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.w: C = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

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

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