class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.r: I = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.q: I = None
        self.txt = txt

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

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

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