class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.y: G = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.w: E = None
        self.y: H = None
        self.o: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: A = None
        self.q: A = None
        self.y: C = None
        self.u: B = None
        self.v: B = None
        self.x: G = None
        self.t: C = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.t: C = None
        self.z: H = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: J = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.w: E = None
        self.y: H = None
        self.o: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: A = None
        self.q: A = None
        self.y: C = None
        self.u: B = None
        self.v: B = None
        self.x: G = None
        self.t: C = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.t: C = None
        self.z: H = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: J = None
        self.p: E = None
        self.txt = txt

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

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

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

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