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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: C = None
        self.y: B = None
        self.o: B = None
        self.t: A = None
        self.q: E = None
        self.r: B = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: C = None
        self.y: B = None
        self.o: B = None
        self.t: A = None
        self.q: E = None
        self.r: B = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: H = None
        self.txt = txt

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

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