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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: A = None
        self.u: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: B = None
        self.p: E = None
        self.v: H = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: A = None
        self.u: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: B = None
        self.p: E = None
        self.v: H = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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