class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.p: C = None
        self.o: F = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: I = None
        self.x: I = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.s: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: A = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.p: C = None
        self.o: F = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: I = None
        self.x: I = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.s: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: A = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

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

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