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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.s: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.y: G = None
        self.s: I = None
        self.o: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.s: I = None
        self.t: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.s: H = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.y: G = None
        self.s: I = None
        self.o: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.s: I = None
        self.t: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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