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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: H = None
        self.q: D = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.s: H = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: H = None
        self.q: D = None
        self.o: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.s: H = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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