class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: E = None
        self.p: B = None
        self.x: A = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: G = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: E = None
        self.p: B = None
        self.x: A = None
        self.u: E = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: G = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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

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