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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: F = None
        self.t: F = None
        self.p: B = None
        self.o: B = None
        self.u: D = None
        self.w: B = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: F = None
        self.t: F = None
        self.p: B = None
        self.o: B = None
        self.u: D = None
        self.w: B = None
        self.z: J = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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