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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.u: C = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.u: C = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

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

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