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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: A = None
        self.u: H = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: C = None
        self.r: C = None
        self.v: C = None
        self.w: J = None
        self.s: A = None
        self.y: D = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.w: B = None
        self.x: G = None
        self.v: D = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: A = None
        self.u: H = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: C = None
        self.r: C = None
        self.v: C = None
        self.w: J = None
        self.s: A = None
        self.y: D = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.w: B = None
        self.x: G = None
        self.v: D = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

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

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