class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: F = None
        self.w: E = None
        self.x: G = None
        self.t: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: G = None
        self.z: E = None
        self.q: G = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: D = None
        self.w: J = None
        self.u: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: F = None
        self.w: E = None
        self.x: G = None
        self.t: E = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: G = None
        self.z: E = None
        self.q: G = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: D = None
        self.w: J = None
        self.u: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

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

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

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