class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: B = None
        self.t: B = None
        self.y: G = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.q: F = None
        self.x: D = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.v: J = None
        self.s: D = None
        self.o: J = None
        self.u: C = None
        self.x: F = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: B = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.x: F = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: H = None
        self.q: F = None
        self.x: D = None
        self.u: E = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.v: J = None
        self.s: D = None
        self.o: J = None
        self.u: C = None
        self.x: F = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: B = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.x: F = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

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

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