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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.t: G = None
        self.w: A = None
        self.r: G = None
        self.y: G = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.t: G = None
        self.w: A = None
        self.r: G = None
        self.y: G = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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