class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.v: D = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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