class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: I = None
        self.v: F = None
        self.x: B = None
        self.y: G = None
        self.p: E = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: J = None
        self.x: H = None
        self.q: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.u: A = None
        self.t: E = None
        self.q: E = None
        self.z: I = None
        self.p: E = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: D = None
        self.s: C = None
        self.x: B = None
        self.r: E = None
        self.y: I = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.v: E = None
        self.o: A = None
        self.txt = txt

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

f = A("f")
b = B("b")
c = C("c")
h = D("h")
e = E("e")
g = F("g")
m = G("m")
j = H("j")
i = I("i")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: J = None
        self.x: H = None
        self.q: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.u: A = None
        self.t: E = None
        self.q: E = None
        self.z: I = None
        self.p: E = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: D = None
        self.s: C = None
        self.x: B = None
        self.r: E = None
        self.y: I = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.v: E = None
        self.o: A = None
        self.txt = txt

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

f = A("f")
b = B("b")
c = C("c")
h = D("h")
e = E("e")
g = F("g")
m = G("m")
j = H("j")
i = I("i")
n = J("n")

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