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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: C = None
        self.w: E = None
        self.o: C = None
        self.y: B = None
        self.t: A = None
        self.txt = txt

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

g.z = n
g.q = n
g.x = n
g.t = j
g.w = j
g.y = e
g.o = l
j.p = f
j.t = f
n.z = g
f.z = c
f.y = c
f.r = n
f.v = g
f.p = e
f.o = e
e.v = j
e.z = j
e.y = c
c.z = j
c.r = e
c.v = f
c.t = f
c.o = f
c.p = m
c.w = n
m.z = j
m.y = j
m.v = n
m.o = n
m.w = e
m.t = g
l.z = n
l.q = n
l.x = n
l.t = j
l.w = j
l.y = e
l.o = g
assert n.z.y.v.t.v.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.y: E = None
        self.o: A = None
        self.w: B = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: C = None
        self.w: E = None
        self.o: C = None
        self.y: B = None
        self.t: A = None
        self.txt = txt

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

g.z = n
g.q = n
g.x = n
g.t = j
g.w = j
g.y = e
g.o = l
j.p = f
j.t = f
n.z = g
f.z = c
f.y = c
f.r = n
f.v = g
f.p = e
f.o = e
e.v = j
e.z = j
e.y = c
c.z = j
c.r = e
c.v = f
c.t = f
c.o = f
c.p = m
c.w = n
m.z = j
m.y = j
m.v = n
m.o = n
m.w = e
m.t = g
l.z = n
l.q = n
l.x = n
l.t = j
l.w = j
l.y = e
l.o = g
assert n.z.y.v.t.v.w.t.txt == "f"