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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.t: B = None
        self.o: H = None
        self.y: H = None
        self.v: B = None
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.t: B = None
        self.o: H = None
        self.y: H = None
        self.v: B = None
        self.z: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: G = None
        self.txt = txt

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

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