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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: E = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: E = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: C = None
        self.txt = txt

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

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

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

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