class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

n = A("n")
i = B("i")
l = C("l")
e = D("e")
b = E("b")
g = F("g")
m = F("m")
f = D("f")
k = B("k")

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

n = A("n")
i = B("i")
l = C("l")
e = D("e")
b = E("b")
g = F("g")
m = F("m")
f = D("f")
k = B("k")

n.t = f
i.w = l
i.x = b
i.r = b
i.s = f
l.t = m
l.y = n
l.o = n
e.p = i
e.x = b
e.w = n
e.v = l
b.w = g
g.w = m
g.z = n
m.w = g
m.z = n
f.p = i
f.x = b
f.w = n
f.v = l
k.w = l
k.x = b
k.r = b
k.s = f
assert b.w.w.z.t.w.t.v.txt == "l"