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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.p: C = None
        self.t: E = None
        self.y: F = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.z: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.q: B = None
        self.r: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.p: C = None
        self.t: E = None
        self.y: F = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.z: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.q: B = None
        self.r: C = None
        self.t: C = None
        self.txt = txt

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

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