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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: E = None
        self.r: F = None
        self.z: J = None
        self.s: H = None
        self.v: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: E = None
        self.r: F = None
        self.z: J = None
        self.s: H = None
        self.v: J = None
        self.x: J = None
        self.txt = txt

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

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

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