class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: I = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.s: G = None
        self.w: G = None
        self.z: C = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.z: C = None
        self.r: F = None
        self.x: F = None
        self.u: G = None
        self.y: F = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.s: G = None
        self.w: G = None
        self.z: C = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.z: C = None
        self.r: F = None
        self.x: F = None
        self.u: G = None
        self.y: F = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

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

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