class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: E = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.u: D = None
        self.s: A = None
        self.o: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.q: F = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: H = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.u: D = None
        self.s: A = None
        self.o: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.q: F = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: H = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

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

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