class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.q: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.y: D = None
        self.p: C = None
        self.txt = txt

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

m = A("m")
b = B("b")
e = C("e")
d = D("d")
f = E("f")
n = B("n")
k = A("k")
g = D("g")
h = E("h")
a = C("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.y: D = None
        self.p: C = None
        self.txt = txt

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

m = A("m")
b = B("b")
e = C("e")
d = D("d")
f = E("f")
n = B("n")
k = A("k")
g = D("g")
h = E("h")
a = C("a")

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