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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.r: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.r: B = None
        self.o: D = None
        self.txt = txt

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

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

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