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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.v: B = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.p: C = None
        self.q: C = None
        self.x: A = None
        self.txt = txt

m = A("m")
f = B("f")
e = C("e")
a = D("a")
j = E("j")
i = F("i")
k = A("k")
h = C("h")

m.s = h
m.r = e
m.t = k
m.w = j
f.p = j
f.v = j
f.y = j
f.w = i
f.t = a
e.v = h
e.s = i
a.w = j
a.u = j
a.v = f
a.r = f
a.z = h
j.w = m
i.u = f
i.o = e
i.p = e
i.q = e
i.x = k
k.s = h
k.r = e
k.t = m
k.w = j
h.v = e
h.s = i
assert m.s.s.p.v.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.v: B = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.p: C = None
        self.q: C = None
        self.x: A = None
        self.txt = txt

m = A("m")
f = B("f")
e = C("e")
a = D("a")
j = E("j")
i = F("i")
k = A("k")
h = C("h")

m.s = h
m.r = e
m.t = k
m.w = j
f.p = j
f.v = j
f.y = j
f.w = i
f.t = a
e.v = h
e.s = i
a.w = j
a.u = j
a.v = f
a.r = f
a.z = h
j.w = m
i.u = f
i.o = e
i.p = e
i.q = e
i.x = k
k.s = h
k.r = e
k.t = m
k.w = j
h.v = e
h.s = i
assert m.s.s.p.v.s.q.txt == "e"