class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.o: C = None
        self.y: G = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: E = None
        self.w: B = None
        self.s: F = None
        self.u: E = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.v: G = None
        self.t: G = None
        self.p: E = None
        self.z: F = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: H = None
        self.v: B = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: E = None
        self.w: B = None
        self.s: F = None
        self.u: E = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.v: G = None
        self.t: G = None
        self.p: E = None
        self.z: F = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: H = None
        self.v: B = None
        self.z: B = None
        self.txt = txt

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

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