class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.x: D = None
        self.v: F = None
        self.o: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.x: D = None
        self.v: F = None
        self.o: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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