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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.y: G = None
        self.t: H = None
        self.x: E = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: I = None
        self.t: G = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: B = None
        self.r: D = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.y: G = None
        self.t: H = None
        self.x: E = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: I = None
        self.t: G = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: B = None
        self.r: D = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

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

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