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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: D = None
        self.q: G = None
        self.u: I = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: H = None
        self.s: E = None
        self.q: J = None
        self.o: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: B = None
        self.p: A = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.p: E = None
        self.v: A = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: D = None
        self.q: G = None
        self.u: I = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: H = None
        self.s: E = None
        self.q: J = None
        self.o: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: B = None
        self.p: A = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.p: E = None
        self.v: A = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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