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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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