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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

n.y = f
n.w = m
n.z = m
n.v = g
b.x = l
b.y = l
b.p = k
b.s = m
b.v = g
b.t = i
b.u = c
m.x = f
a.r = b
a.y = l
a.o = n
f.x = m
k.u = i
k.z = c
k.p = b
l.z = k
l.v = f
c.u = n
c.z = k
c.p = b
g.r = b
g.y = l
g.o = i
i.y = f
i.w = m
i.z = m
i.v = a
assert a.o.w.x.x.x.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: C = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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