class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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