class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: H = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: B = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: H = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.o: E = None
        self.w: B = None
        self.y: E = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.p: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: B = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: H = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: E = None
        self.o: E = None
        self.w: B = None
        self.y: E = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.p: F = None
        self.u: E = None
        self.txt = txt

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

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

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