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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.v: C = None
        self.p: D = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

i = A("i")
h = B("h")
b = C("b")
f = D("f")
g = E("g")
e = F("e")
n = G("n")
l = D("l")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.v: C = None
        self.p: D = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

i = A("i")
h = B("h")
b = C("b")
f = D("f")
g = E("g")
e = F("e")
n = G("n")
l = D("l")

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