class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.t: C = None
        self.s: D = None
        self.q: A = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: A = None
        self.q: H = None
        self.y: F = None
        self.z: F = None
        self.v: G = None
        self.t: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: G = None
        self.s: G = None
        self.o: B = None
        self.t: D = None
        self.v: B = None
        self.z: H = None
        self.p: A = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.t: C = None
        self.s: D = None
        self.q: A = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: A = None
        self.q: H = None
        self.y: F = None
        self.z: F = None
        self.v: G = None
        self.t: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: G = None
        self.s: G = None
        self.o: B = None
        self.t: D = None
        self.v: B = None
        self.z: H = None
        self.p: A = None
        self.w: B = None
        self.txt = txt

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

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