class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.q: B = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: G = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.y: B = None
        self.s: B = None
        self.o: A = None
        self.txt = txt

g = A("g")
k = B("k")
c = C("c")
m = D("m")
i = E("i")
n = F("n")
e = G("e")
d = H("d")
j = I("j")

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: G = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.y: B = None
        self.s: B = None
        self.o: A = None
        self.txt = txt

g = A("g")
k = B("k")
c = C("c")
m = D("m")
i = E("i")
n = F("n")
e = G("e")
d = H("d")
j = I("j")

g.y = i
g.w = i
g.q = k
g.z = j
k.w = j
k.x = n
c.p = j
c.x = e
c.u = d
c.w = k
m.r = g
i.s = k
n.z = d
n.s = d
n.t = c
e.t = n
e.o = k
e.z = i
d.r = e
d.x = g
j.v = d
j.p = n
j.y = k
j.s = k
j.o = g
assert e.z.s.w.y.w.o.z.y.txt == "k"