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

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

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

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

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

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

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

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

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

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

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

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

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

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

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