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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: G = None
        self.o: B = None
        self.q: E = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.s: D = None
        self.u: A = None
        self.txt = txt

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

n = A("n")
l = B("l")
g = C("g")
d = D("d")
k = E("k")
c = F("c")
e = G("e")
j = C("j")
f = B("f")
i = C("i")

n.w = d
n.s = d
n.u = i
n.y = e
n.t = e
n.x = f
n.o = l
l.s = k
l.q = k
l.p = e
l.o = f
l.x = d
l.r = d
g.q = e
g.r = e
g.o = c
d.u = c
k.p = c
k.w = f
c.x = e
c.t = n
c.u = n
c.s = d
e.s = l
j.q = e
j.r = e
j.o = c
f.s = k
f.q = k
f.p = e
f.o = l
f.x = d
f.r = d
i.q = e
i.r = e
i.o = c
assert f.o.o.q.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.y: G = None
        self.t: G = None
        self.x: B = None
        self.o: B = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: G = None
        self.o: B = None
        self.q: E = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.s: D = None
        self.u: A = None
        self.txt = txt

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

n = A("n")
l = B("l")
g = C("g")
d = D("d")
k = E("k")
c = F("c")
e = G("e")
j = C("j")
f = B("f")
i = C("i")

n.w = d
n.s = d
n.u = i
n.y = e
n.t = e
n.x = f
n.o = l
l.s = k
l.q = k
l.p = e
l.o = f
l.x = d
l.r = d
g.q = e
g.r = e
g.o = c
d.u = c
k.p = c
k.w = f
c.x = e
c.t = n
c.u = n
c.s = d
e.s = l
j.q = e
j.r = e
j.o = c
f.s = k
f.q = k
f.p = e
f.o = l
f.x = d
f.r = d
i.q = e
i.r = e
i.o = c
assert f.o.o.q.w.o.txt == "l"