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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.t: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.w: C = None
        self.x: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.s: E = None
        self.v: H = None
        self.z: D = None
        self.p: F = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.t: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.w: C = None
        self.x: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.s: E = None
        self.v: H = None
        self.z: D = None
        self.p: F = None
        self.o: H = None
        self.txt = txt

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

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