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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: H = None
        self.r: G = None
        self.y: H = None
        self.z: A = None
        self.u: F = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: H = None
        self.r: G = None
        self.y: H = None
        self.z: A = None
        self.u: F = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

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