class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: B = None
        self.w: E = None
        self.o: G = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.t: E = None
        self.x: G = None
        self.y: I = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.t: E = None
        self.x: G = None
        self.y: I = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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