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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.r: D = None
        self.p: D = None
        self.z: E = None
        self.x: C = None
        self.v: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.r: D = None
        self.p: D = None
        self.z: E = None
        self.x: C = None
        self.v: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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