class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.x: C = None
        self.t: E = None
        self.z: D = None
        self.y: B = None
        self.p: B = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.s: C = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: H = None
        self.x: C = None
        self.q: H = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.w: C = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: I = None
        self.v: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.s: C = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: H = None
        self.x: C = None
        self.q: H = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.w: C = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: I = None
        self.v: D = None
        self.r: A = None
        self.txt = txt

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

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

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