class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.q: G = None
        self.s: H = None
        self.y: H = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: D = None
        self.q: G = None
        self.u: I = None
        self.w: B = None
        self.t: E = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.p: A = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.q: G = None
        self.s: H = None
        self.y: H = None
        self.p: H = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: D = None
        self.q: G = None
        self.u: I = None
        self.w: B = None
        self.t: E = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.p: A = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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