class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: B = None
        self.w: E = None
        self.p: E = None
        self.s: D = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: F = None
        self.p: H = None
        self.x: D = None
        self.w: C = None
        self.q: H = None
        self.s: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: F = None
        self.r: E = None
        self.s: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: F = None
        self.p: H = None
        self.x: D = None
        self.w: C = None
        self.q: H = None
        self.s: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: F = None
        self.r: E = None
        self.s: F = None
        self.v: B = None
        self.txt = txt

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

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