class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: E = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.y: H = None
        self.u: C = None
        self.r: F = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.u: G = None
        self.p: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.u: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.y: H = None
        self.u: C = None
        self.r: F = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.u: G = None
        self.p: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.u: D = None
        self.x: C = None
        self.txt = txt

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

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

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