class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: D = None
        self.x: D = None
        self.s: A = None
        self.txt = txt

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

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

f = A("f")
l = B("l")
h = C("h")
c = D("c")
i = E("i")
m = F("m")
e = G("e")
j = B("j")
n = G("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: D = None
        self.x: D = None
        self.s: A = None
        self.txt = txt

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

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

f = A("f")
l = B("l")
h = C("h")
c = D("c")
i = E("i")
m = F("m")
e = G("e")
j = B("j")
n = G("n")

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