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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: F = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: F = None
        self.x: F = None
        self.q: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.q: E = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: F = None
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: F = None
        self.x: F = None
        self.q: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: F = None
        self.q: E = None
        self.u: F = None
        self.txt = txt

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

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