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

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: C = None
        self.y: I = None
        self.v: G = None
        self.t: C = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: C = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: F = None
        self.z: D = None
        self.w: G = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: C = None
        self.y: I = None
        self.v: G = None
        self.t: C = None
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: C = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: F = None
        self.z: D = None
        self.w: G = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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