class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: F = None
        self.y: D = None
        self.z: B = None
        self.w: G = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: F = None
        self.y: D = None
        self.z: B = None
        self.w: G = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.txt = txt

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

g.t = i
g.y = k
c.v = m
c.x = m
c.w = b
b.u = a
b.z = d
b.y = m
f.t = d
f.v = c
f.o = i
f.q = i
j.w = k
j.u = m
j.z = a
m.v = i
m.o = i
m.z = k
m.t = b
m.r = f
m.q = j
m.w = j
m.u = c
m.y = a
a.t = f
a.s = d
i.o = a
i.w = a
i.q = m
i.y = f
i.z = c
i.s = c
k.r = g
k.t = j
d.t = f
d.v = c
d.o = i
d.q = i
assert j.z.s.q.y.q.o.t.q.y.txt == "f"