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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: C = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: C = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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