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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.q: H = None
        self.o: G = None
        self.z: H = None
        self.u: F = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.q: H = None
        self.o: G = None
        self.z: H = None
        self.u: F = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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