class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: F = None
        self.t: D = None
        self.u: E = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.p: D = None
        self.w: D = None
        self.txt = txt

g = A("g")
e = B("e")
c = C("c")
d = D("d")
n = E("n")
a = F("a")
h = G("h")

g.v = c
g.y = a
g.t = d
g.u = n
g.r = n
g.o = h
e.w = h
e.y = a
c.x = a
d.t = e
d.w = e
n.z = e
a.u = h
a.v = h
a.w = h
a.o = e
a.t = d
a.x = n
h.y = d
h.p = d
h.w = d
h.s = g
assert c.x.o.w.p.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: F = None
        self.t: D = None
        self.u: E = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: A = None
        self.p: D = None
        self.w: D = None
        self.txt = txt

g = A("g")
e = B("e")
c = C("c")
d = D("d")
n = E("n")
a = F("a")
h = G("h")

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