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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.txt = txt

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

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