class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: H = None
        self.z: G = None
        self.q: H = None
        self.o: F = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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