class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: H = None
        self.z: H = None
        self.x: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: C = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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