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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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