class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.v: G = None
        self.q: F = None
        self.r: A = None
        self.p: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.u: C = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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

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

c.y = m
c.s = m
g.p = k
g.o = k
g.y = j
b.y = c
b.t = h
b.x = e
b.p = k
b.q = k
b.u = d
a.s = k
a.v = k
a.t = j
a.q = j
a.r = c
a.p = e
a.o = h
h.p = b
h.u = b
h.r = b
h.q = e
h.v = j
j.v = k
k.y = m
k.o = c
k.p = c
k.w = b
k.s = j
k.r = e
d.s = k
d.v = k
d.t = m
d.q = m
d.r = c
d.p = e
d.o = e
m.v = k
e.p = b
e.u = b
e.r = b
e.q = h
e.v = m
assert j.v.r.p.x.v.v.y.v.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.v: G = None
        self.q: F = None
        self.r: A = None
        self.p: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.u: C = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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