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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: E = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: G = None
        self.q: E = None
        self.z: D = None
        self.o: D = None
        self.w: G = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.txt = txt

j = A("j")
e = B("e")
a = C("a")
k = D("k")
l = E("l")
i = F("i")
c = G("c")
d = G("d")

j.y = i
e.o = i
e.y = l
e.r = a
e.z = j
a.y = l
a.q = l
a.x = c
a.z = k
a.o = k
a.w = d
a.s = e
k.y = e
k.u = e
k.o = e
k.w = a
k.p = a
k.r = d
k.z = c
l.o = i
l.v = c
l.s = j
i.y = k
i.q = l
c.u = d
c.v = d
d.u = c
d.v = c
assert a.x.v.v.u.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: E = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: G = None
        self.q: E = None
        self.z: D = None
        self.o: D = None
        self.w: G = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.txt = txt

j = A("j")
e = B("e")
a = C("a")
k = D("k")
l = E("l")
i = F("i")
c = G("c")
d = G("d")

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