class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: G = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: G = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: J = None
        self.o: G = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: H = None
        self.p: E = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: G = None
        self.z: G = None
        self.o: E = None
        self.s: H = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: H = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: G = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: J = None
        self.o: G = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: H = None
        self.p: E = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: G = None
        self.z: G = None
        self.o: E = None
        self.s: H = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: H = None
        self.t: A = None
        self.txt = txt

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

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