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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: D = None
        self.v: F = None
        self.u: B = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.x: H = None
        self.v: H = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.z: I = None
        self.v: G = None
        self.o: D = None
        self.p: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: F = None
        self.t: B = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: D = None
        self.v: F = None
        self.u: B = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.x: H = None
        self.v: H = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.z: I = None
        self.v: G = None
        self.o: D = None
        self.p: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: F = None
        self.t: B = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.q: C = None
        self.txt = txt

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

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