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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.y: G = None
        self.q: F = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: E = None
        self.y: I = None
        self.v: I = None
        self.u: I = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.t: C = None
        self.x: I = None
        self.p: E = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: G = None
        self.y: G = None
        self.q: F = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: E = None
        self.y: I = None
        self.v: I = None
        self.u: I = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.t: C = None
        self.x: I = None
        self.p: E = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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