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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: F = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.x: G = None
        self.o: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: H = None
        self.o: H = None
        self.q: C = None
        self.y: C = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: H = None
        self.q: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: F = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.x: G = None
        self.o: F = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: H = None
        self.o: H = None
        self.q: C = None
        self.y: C = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: H = None
        self.q: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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