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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: B = None
        self.p: A = None
        self.s: E = None
        self.x: F = None
        self.u: C = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.w: C = None
        self.r: C = None
        self.p: B = None
        self.x: D = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: B = None
        self.p: A = None
        self.s: E = None
        self.x: F = None
        self.u: C = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.w: C = None
        self.r: C = None
        self.p: B = None
        self.x: D = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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