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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: G = None
        self.u: H = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: G = None
        self.u: H = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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