class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.w: D = None
        self.z: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.r: A = None
        self.t: B = None
        self.s: A = None
        self.txt = txt

n = A("n")
m = B("m")
e = C("e")
b = D("b")
l = E("l")
i = F("i")
f = D("f")
c = C("c")

n.q = b
n.w = b
n.u = f
n.z = i
n.t = m
m.p = b
m.v = l
m.w = c
m.q = i
m.t = n
e.v = m
e.r = n
e.p = n
e.u = b
e.w = c
b.v = m
l.q = i
l.v = c
l.o = c
i.q = n
i.r = n
i.s = n
i.y = l
i.t = m
f.v = m
c.v = m
c.r = n
c.p = n
c.u = f
c.w = e
assert f.v.v.q.y.v.u.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.w: D = None
        self.z: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.r: A = None
        self.t: B = None
        self.s: A = None
        self.txt = txt

n = A("n")
m = B("m")
e = C("e")
b = D("b")
l = E("l")
i = F("i")
f = D("f")
c = C("c")

n.q = b
n.w = b
n.u = f
n.z = i
n.t = m
m.p = b
m.v = l
m.w = c
m.q = i
m.t = n
e.v = m
e.r = n
e.p = n
e.u = b
e.w = c
b.v = m
l.q = i
l.v = c
l.o = c
i.q = n
i.r = n
i.s = n
i.y = l
i.t = m
f.v = m
c.v = m
c.r = n
c.p = n
c.u = f
c.w = e
assert f.v.v.q.y.v.u.v.v.txt == "l"