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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: A = None
        self.y: F = None
        self.z: D = None
        self.u: F = None
        self.o: A = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

j = A("j")
c = B("c")
g = C("g")
n = D("n")
f = E("f")
l = F("l")
b = G("b")
a = B("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: A = None
        self.y: F = None
        self.z: D = None
        self.u: F = None
        self.o: A = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

j = A("j")
c = B("c")
g = C("g")
n = D("n")
f = E("f")
l = F("l")
b = G("b")
a = B("a")

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