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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.u: A = None
        self.x: B = None
        self.txt = txt

n = A("n")
b = B("b")
g = C("g")
c = D("c")
m = E("m")
l = B("l")
h = A("h")

n.s = b
n.y = l
b.v = l
b.o = m
b.y = g
g.u = c
g.x = c
g.w = c
g.v = m
g.t = b
c.r = g
m.p = l
m.x = l
m.y = n
m.u = n
l.v = b
l.o = m
l.y = g
h.s = l
h.y = b
assert b.y.x.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.u: A = None
        self.x: B = None
        self.txt = txt

n = A("n")
b = B("b")
g = C("g")
c = D("c")
m = E("m")
l = B("l")
h = A("h")

n.s = b
n.y = l
b.v = l
b.o = m
b.y = g
g.u = c
g.x = c
g.w = c
g.v = m
g.t = b
c.r = g
m.p = l
m.x = l
m.y = n
m.u = n
l.v = b
l.o = m
l.y = g
h.s = l
h.y = b
assert b.y.x.r.w.txt == "c"