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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: F = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: B = None
        self.z: H = None
        self.v: D = None
        self.w: H = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: F = None
        self.o: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: B = None
        self.z: H = None
        self.v: D = None
        self.w: H = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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