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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: D = None
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: D = None
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.txt = txt

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

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

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