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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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