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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.q: E = None
        self.x: I = None
        self.s: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: D = None
        self.t: G = None
        self.s: C = None
        self.r: H = None
        self.y: B = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

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

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

c.p = f
c.q = f
c.v = f
c.x = b
c.w = e
c.y = e
c.s = j
c.t = i
a.s = k
a.p = k
a.z = k
a.y = k
a.q = c
a.u = d
a.x = d
a.t = f
a.w = e
b.z = k
e.o = b
i.v = b
i.t = b
i.u = b
i.p = b
i.z = a
i.w = f
i.q = n
k.t = c
k.y = b
k.o = b
k.q = i
k.x = j
k.s = f
n.v = b
n.r = e
f.o = j
j.w = e
j.q = e
j.t = n
j.o = n
j.s = b
j.r = f
j.y = a
j.p = k
d.y = a
assert a.u.y.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: H = None
        self.x: C = None
        self.w: D = None
        self.y: D = None
        self.s: I = None
        self.t: E = None
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.q: E = None
        self.x: I = None
        self.s: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: D = None
        self.t: G = None
        self.s: C = None
        self.r: H = None
        self.y: B = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

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

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

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