class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.u: I = None
        self.x: B = None
        self.y: I = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.q: C = None
        self.r: B = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.u: B = None
        self.q: E = None
        self.p: B = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.q: C = None
        self.r: B = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.u: B = None
        self.q: E = None
        self.p: B = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

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

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