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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.q: F = None
        self.z: E = None
        self.txt = txt

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

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

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

m.o = e
k.z = d
k.s = n
d.u = n
d.s = k
d.t = e
l.w = i
l.y = e
l.q = f
l.z = n
n.w = h
n.r = l
n.q = m
g.v = l
g.q = f
e.w = i
e.y = l
e.q = f
e.z = n
f.v = e
f.q = g
i.z = d
i.s = n
h.u = n
h.s = k
h.t = l
assert l.y.y.q.q.v.w.z.s.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.q: F = None
        self.z: E = None
        self.txt = txt

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

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

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

m.o = e
k.z = d
k.s = n
d.u = n
d.s = k
d.t = e
l.w = i
l.y = e
l.q = f
l.z = n
n.w = h
n.r = l
n.q = m
g.v = l
g.q = f
e.w = i
e.y = l
e.q = f
e.z = n
f.v = e
f.q = g
i.z = d
i.s = n
h.u = n
h.s = k
h.t = l
assert l.y.y.q.q.v.w.z.s.z.s.txt == "k"