class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: G = None
        self.p: I = None
        self.y: I = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.q: C = None
        self.t: C = None
        self.v: A = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: B = None
        self.y: G = None
        self.q: E = None
        self.o: B = None
        self.p: A = None
        self.z: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: E = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: F = None
        self.z: D = None
        self.w: D = None
        self.s: C = None
        self.v: C = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.q: A = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: C = None
        self.z: A = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.q: C = None
        self.t: C = None
        self.v: A = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: B = None
        self.y: G = None
        self.q: E = None
        self.o: B = None
        self.p: A = None
        self.z: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: E = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: F = None
        self.z: D = None
        self.w: D = None
        self.s: C = None
        self.v: C = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.q: A = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: C = None
        self.z: A = None
        self.u: H = None
        self.txt = txt

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

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