class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.x: F = None
        self.o: B = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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