class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.x: C = None
        self.s: E = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.z: D = None
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: B = None
        self.t: D = None
        self.x: D = None
        self.q: A = None
        self.u: B = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.x: C = None
        self.s: E = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.z: D = None
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: B = None
        self.t: D = None
        self.x: D = None
        self.q: A = None
        self.u: B = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

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

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

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