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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: I = None
        self.q: I = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.x: I = None
        self.z: H = None
        self.v: A = None
        self.q: I = None
        self.y: A = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.x: A = None
        self.v: D = None
        self.u: H = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: I = None
        self.q: I = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: F = None
        self.x: I = None
        self.z: H = None
        self.v: A = None
        self.q: I = None
        self.y: A = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.x: A = None
        self.v: D = None
        self.u: H = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

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

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