class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.p: D = None
        self.u: D = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.p: D = None
        self.u: D = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

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

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