class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: E = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: F = None
        self.p: J = None
        self.y: C = None
        self.q: E = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: D = None
        self.r: E = None
        self.x: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: E = None
        self.o: C = None
        self.y: E = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: C = None
        self.q: G = None
        self.t: F = None
        self.s: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: I = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: F = None
        self.p: J = None
        self.y: C = None
        self.q: E = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: D = None
        self.r: E = None
        self.x: B = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: E = None
        self.o: C = None
        self.y: E = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: C = None
        self.q: G = None
        self.t: F = None
        self.s: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: I = None
        self.y: E = None
        self.txt = txt

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

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