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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.t: H = None
        self.v: C = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: C = None
        self.r: C = None
        self.u: F = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

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

b = A("b")
g = B("g")
d = C("d")
c = D("c")
l = E("l")
e = F("e")
h = G("h")
k = H("k")
i = E("i")

b.o = h
g.p = e
g.s = e
g.t = l
d.x = i
d.v = c
d.o = e
d.p = h
c.w = k
l.p = g
l.w = c
l.t = c
l.z = d
l.u = b
l.x = k
e.x = d
e.v = d
e.p = d
e.s = c
e.t = k
e.y = h
h.z = k
h.q = d
h.r = d
h.v = d
h.u = e
h.x = b
k.t = e
i.p = g
i.w = c
i.t = c
i.z = d
i.u = b
i.x = k
assert e.y.q.x.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.t: H = None
        self.v: C = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: C = None
        self.r: C = None
        self.u: F = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

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

b = A("b")
g = B("g")
d = C("d")
c = D("c")
l = E("l")
e = F("e")
h = G("h")
k = H("k")
i = E("i")

b.o = h
g.p = e
g.s = e
g.t = l
d.x = i
d.v = c
d.o = e
d.p = h
c.w = k
l.p = g
l.w = c
l.t = c
l.z = d
l.u = b
l.x = k
e.x = d
e.v = d
e.p = d
e.s = c
e.t = k
e.y = h
h.z = k
h.q = d
h.r = d
h.v = d
h.u = e
h.x = b
k.t = e
i.p = g
i.w = c
i.t = c
i.z = d
i.u = b
i.x = k
assert e.y.q.x.w.w.txt == "k"