class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: H = None
        self.v: G = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.x: F = None
        self.o: H = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: I = None
        self.x: G = None
        self.r: H = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: H = None
        self.v: G = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.x: F = None
        self.o: H = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: I = None
        self.x: G = None
        self.r: H = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.txt = txt

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

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

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

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