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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.v: A = None
        self.p: D = None
        self.q: D = None
        self.z: C = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.t: A = None
        self.o: A = None
        self.s: D = None
        self.z: A = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.v: A = None
        self.p: D = None
        self.q: D = None
        self.z: C = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.t: A = None
        self.o: A = None
        self.s: D = None
        self.z: A = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

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

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