class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

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

j = A("j")
f = B("f")
l = C("l")
b = D("b")
e = E("e")
n = F("n")
h = B("h")

j.s = l
j.x = b
j.z = n
f.t = l
f.y = l
f.z = n
f.q = h
f.u = e
l.z = h
l.v = n
b.t = j
b.u = e
b.r = e
b.p = e
e.r = l
e.x = n
e.s = n
e.u = b
e.o = h
n.v = e
n.s = e
n.z = b
h.t = l
h.y = l
h.z = n
h.q = f
h.u = e
assert f.z.v.x.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

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

j = A("j")
f = B("f")
l = C("l")
b = D("b")
e = E("e")
n = F("n")
h = B("h")

j.s = l
j.x = b
j.z = n
f.t = l
f.y = l
f.z = n
f.q = h
f.u = e
l.z = h
l.v = n
b.t = j
b.u = e
b.r = e
b.p = e
e.r = l
e.x = n
e.s = n
e.u = b
e.o = h
n.v = e
n.s = e
n.z = b
h.t = l
h.y = l
h.z = n
h.q = f
h.u = e
assert f.z.v.x.s.r.txt == "l"