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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: G = None
        self.y: E = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: G = None
        self.y: E = None
        self.u: G = None
        self.s: A = None
        self.txt = txt

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

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