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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.v: I = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: H = None
        self.y: C = None
        self.z: F = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.v: I = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: H = None
        self.y: C = None
        self.z: F = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.txt = txt

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

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

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

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