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

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

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

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

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

a = A("a")
k = B("k")
m = C("m")
h = D("h")
c = E("c")
j = A("j")
g = C("g")
d = A("d")
i = A("i")
l = B("l")

a.x = g
a.s = g
a.u = c
k.z = j
k.t = d
k.o = c
m.t = c
m.z = h
m.x = g
h.r = c
h.v = c
h.s = l
h.y = d
h.u = k
c.z = k
j.x = g
j.u = c
j.s = m
g.t = c
g.z = h
g.x = m
d.x = m
d.s = m
d.u = c
i.x = m
i.s = m
i.u = c
l.z = a
l.t = i
l.o = c
assert k.t.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: E = None
        self.s: C = None
        self.txt = txt

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

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

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

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

a = A("a")
k = B("k")
m = C("m")
h = D("h")
c = E("c")
j = A("j")
g = C("g")
d = A("d")
i = A("i")
l = B("l")

a.x = g
a.s = g
a.u = c
k.z = j
k.t = d
k.o = c
m.t = c
m.z = h
m.x = g
h.r = c
h.v = c
h.s = l
h.y = d
h.u = k
c.z = k
j.x = g
j.u = c
j.s = m
g.t = c
g.z = h
g.x = m
d.x = m
d.s = m
d.u = c
i.x = m
i.s = m
i.u = c
l.z = a
l.t = i
l.o = c
assert k.t.x.x.txt == "g"