class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: I = None
        self.s: C = None
        self.w: G = None
        self.p: B = None
        self.v: C = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: G = None
        self.s: G = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: I = None
        self.s: C = None
        self.w: G = None
        self.p: B = None
        self.v: C = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: G = None
        self.s: G = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

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