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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.x: C = None
        self.z: A = None
        self.y: H = None
        self.v: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: H = None
        self.s: H = None
        self.v: A = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.x: C = None
        self.z: A = None
        self.y: H = None
        self.v: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: H = None
        self.s: H = None
        self.v: A = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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