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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

g.v = a
g.t = a
g.q = k
g.w = m
g.p = i
g.s = n
i.r = g
i.q = g
i.s = n
i.y = f
i.p = e
i.u = a
m.u = f
n.z = g
n.r = g
n.x = f
k.y = g
f.t = i
f.v = g
a.s = k
a.u = k
e.u = f
assert n.z.v.u.y.s.z.t.u.txt == "k"