class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: F = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

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

g = A("g")
n = B("n")
b = C("b")
c = D("c")
k = E("k")
m = F("m")
j = B("j")
h = E("h")
i = D("i")
e = D("e")

g.w = h
g.u = m
g.q = c
g.y = k
n.s = g
n.o = g
n.u = b
n.y = m
b.v = c
c.w = j
c.v = j
c.p = b
c.o = m
c.q = e
c.x = h
k.o = n
k.w = j
k.r = m
m.y = g
j.s = g
j.o = g
j.u = b
j.y = m
h.o = j
h.w = n
h.r = m
i.w = j
i.p = b
i.v = n
i.o = m
i.q = e
i.x = k
e.w = n
e.p = b
e.v = j
e.o = m
e.q = c
e.x = k
assert b.v.v.s.u.y.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: F = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

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

g = A("g")
n = B("n")
b = C("b")
c = D("c")
k = E("k")
m = F("m")
j = B("j")
h = E("h")
i = D("i")
e = D("e")

g.w = h
g.u = m
g.q = c
g.y = k
n.s = g
n.o = g
n.u = b
n.y = m
b.v = c
c.w = j
c.v = j
c.p = b
c.o = m
c.q = e
c.x = h
k.o = n
k.w = j
k.r = m
m.y = g
j.s = g
j.o = g
j.u = b
j.y = m
h.o = j
h.w = n
h.r = m
i.w = j
i.p = b
i.v = n
i.o = m
i.q = e
i.x = k
e.w = n
e.p = b
e.v = j
e.o = m
e.q = c
e.x = k
assert b.v.v.s.u.y.w.r.txt == "m"