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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.w: G = None
        self.r: C = None
        self.y: G = None
        self.s: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.w: G = None
        self.r: C = None
        self.y: G = None
        self.s: E = None
        self.t: A = None
        self.txt = txt

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

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

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