class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: H = None
        self.v: D = None
        self.s: F = None
        self.w: E = None
        self.p: A = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.s: C = None
        self.v: F = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

n = A("n")
c = B("c")
k = C("k")
i = D("i")
d = E("d")
l = F("l")
m = G("m")
a = H("a")
e = A("e")

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: H = None
        self.v: D = None
        self.s: F = None
        self.w: E = None
        self.p: A = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.s: C = None
        self.v: F = None
        self.r: B = None
        self.t: F = None
        self.txt = txt

n = A("n")
c = B("c")
k = C("k")
i = D("i")
d = E("d")
l = F("l")
m = G("m")
a = H("a")
e = A("e")

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