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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: F = None
        self.t: E = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: D = None
        self.u: E = None
        self.r: D = None
        self.o: B = None
        self.s: A = None
        self.z: D = None
        self.txt = txt

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

m = A("m")
h = B("h")
n = C("n")
f = D("f")
g = E("g")
j = F("j")
l = G("l")
d = E("d")
e = A("e")
k = E("k")

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: F = None
        self.t: E = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: D = None
        self.u: E = None
        self.r: D = None
        self.o: B = None
        self.s: A = None
        self.z: D = None
        self.txt = txt

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

m = A("m")
h = B("h")
n = C("n")
f = D("f")
g = E("g")
j = F("j")
l = G("l")
d = E("d")
e = A("e")
k = E("k")

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