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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.x: G = None
        self.o: G = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.o: B = None
        self.t: D = None
        self.x: E = None
        self.txt = txt

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

k = A("k")
h = B("h")
n = C("n")
m = D("m")
b = E("b")
a = F("a")
e = G("e")
f = D("f")
d = A("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.x: G = None
        self.o: G = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.o: B = None
        self.t: D = None
        self.x: E = None
        self.txt = txt

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

k = A("k")
h = B("h")
n = C("n")
m = D("m")
b = E("b")
a = F("a")
e = G("e")
f = D("f")
d = A("d")

k.u = h
k.o = a
k.w = m
h.o = m
h.r = m
n.u = f
n.t = h
n.v = h
m.o = d
m.u = h
m.x = h
m.y = k
m.v = e
m.s = n
m.q = f
b.t = a
b.r = f
b.x = e
b.o = e
b.p = e
b.z = d
a.z = b
a.x = b
a.p = h
a.o = h
a.t = m
e.u = b
e.s = n
f.o = k
f.y = k
f.u = h
f.x = h
f.v = e
f.s = n
f.q = m
d.u = h
d.o = a
d.w = m
assert f.o.o.t.y.u.r.q.o.txt == "k"