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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.q: F = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

k.u = l
k.s = j
m.r = c
m.q = a
m.s = a
m.x = n
m.y = k
m.v = j
g.z = l
g.s = l
g.w = l
g.o = c
g.q = n
j.y = a
j.q = a
j.p = n
j.s = g
c.z = i
c.q = g
n.t = i
a.r = i
a.q = m
a.s = m
a.x = n
a.y = k
a.v = j
i.z = c
i.q = g
l.u = k
l.s = j
assert m.s.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.q: F = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

k.u = l
k.s = j
m.r = c
m.q = a
m.s = a
m.x = n
m.y = k
m.v = j
g.z = l
g.s = l
g.w = l
g.o = c
g.q = n
j.y = a
j.q = a
j.p = n
j.s = g
c.z = i
c.q = g
n.t = i
a.r = i
a.q = m
a.s = m
a.x = n
a.y = k
a.v = j
i.z = c
i.q = g
l.u = k
l.s = j
assert m.s.y.u.txt == "l"