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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: D = None
        self.p: F = None
        self.y: G = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: G = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

j = A("j")
f = B("f")
l = C("l")
a = D("a")
k = E("k")
m = F("m")
c = G("c")
n = H("n")
i = I("i")
g = G("g")

j.o = k
j.w = l
j.x = n
j.u = f
j.p = g
f.u = m
f.p = m
f.v = m
f.q = a
f.y = g
l.q = f
a.u = i
a.z = g
a.w = m
a.q = f
k.r = j
k.z = f
k.w = f
k.p = m
k.o = c
k.u = a
m.z = f
m.v = f
m.u = c
m.r = a
m.y = k
m.w = j
m.o = l
c.y = m
n.q = j
n.x = m
n.y = f
i.w = k
i.z = l
i.o = a
i.u = n
i.r = n
g.y = m
assert j.w.q.y.y.y.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.x: H = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: D = None
        self.p: F = None
        self.y: G = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: G = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

j = A("j")
f = B("f")
l = C("l")
a = D("a")
k = E("k")
m = F("m")
c = G("c")
n = H("n")
i = I("i")
g = G("g")

j.o = k
j.w = l
j.x = n
j.u = f
j.p = g
f.u = m
f.p = m
f.v = m
f.q = a
f.y = g
l.q = f
a.u = i
a.z = g
a.w = m
a.q = f
k.r = j
k.z = f
k.w = f
k.p = m
k.o = c
k.u = a
m.z = f
m.v = f
m.u = c
m.r = a
m.y = k
m.w = j
m.o = l
c.y = m
n.q = j
n.x = m
n.y = f
i.w = k
i.z = l
i.o = a
i.u = n
i.r = n
g.y = m
assert j.w.q.y.y.y.r.w.txt == "l"