class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.u: H = None
        self.w: H = None
        self.r: F = None
        self.x: I = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: F = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: A = None
        self.z: H = None
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: F = None
        self.s: F = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: F = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: A = None
        self.z: H = None
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: F = None
        self.s: F = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

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

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

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

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