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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: E = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: I = None
        self.p: D = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: E = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: I = None
        self.p: D = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.txt = txt

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

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