class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.v: H = None
        self.w: F = None
        self.x: B = None
        self.u: B = None
        self.r: B = None
        self.y: E = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: J = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.r: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: J = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: B = None
        self.s: D = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: J = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.r: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: J = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: B = None
        self.s: D = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

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