class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: E = None
        self.y: I = None
        self.s: D = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: F = None
        self.r: H = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: B = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: I = None
        self.r: A = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: F = None
        self.r: H = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: B = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: I = None
        self.r: A = None
        self.z: H = None
        self.txt = txt

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

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

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

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